import redis
import requests

# r = redis.Redis(host='127.0.0.1', port=6379)
# print(r)
# print(r['Keys']['hardware_open']['online_devices'])
# print(r.get('mykey'))
# print(r['mykey'])

r = redis.Redis(host='10.2.100.35', port=6379, password='chaomeng')
print(r.get('hardware_open:online_devices:121000000205'))
print(r.get('hardware_open:online_devices'))
# sn = '121000000205'
# url = 'http://tools.cm:88/phpRedisAdmin/?view&s=3&d=0'
# key = 'hardware_open:online_devices:' + sn
# params = {
#     'key': key,
#     'k': 'chaomeng'
# }
#
# response = requests.get(url, params=params)
# print(response.status_code)
# print(response.url)
# print(response.text)
